<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>

    <style>
        .float{
            width: 800px;
        }

        .float>div {
            height: 100px;
        }

        .float .left {
            width: 300px;
            float: left;
            background: red;
        }

        .float .right {
            width: 400px;
            float: right;
            background: blue;
            height: 200px;
        }

        .float .center {
            background: green;
            height: 300px;
            /*margin: 0 400px 0 300px;*/
            overflow: hidden;
        }
    </style>
</head>

<body>
    <!-- 创建了BFC的元素的边距与浮动元素的边距不会重叠 -->
    <div class="float">
        <div class="left">left</div>
        <div class="right">right</div>
        <div class="center">center</div>
    </div>

</body>

</html>